<template>
  <div class="containers">
    <div class="top"></div>
    <div class="wel_content">
      <a-result>
				<template #title>
					欢迎进入 <webName></webName>
				</template>
        <template #icon>
          <smile-twoTone />
        </template>
        <template #extra>
          <a-button type="primary" @click="goHome">去首页</a-button>
          <a-button @click="openDrawer">选择您喜欢的风格</a-button>
        </template>
      </a-result>
    </div>
    <div class="footer">
      <p>系统访问人次：-</p>
    </div>
  </div>
  <SettingDrawer @register="register" />
</template>
<script lang="ts" setup>
import { SmileTwoTone } from "@ant-design/icons-vue";
import { router } from "/@/router";
import { ref, onUnmounted } from "vue";
import SettingDrawer from "/@/layouts/default/setting/SettingDrawer";
import { useDrawer } from "/@/components/Drawer";
const goHome = () => {
  router.push("/home");
};
let timer = null;
const timeStr = ref<string>("");
const updateTime = () => {
  timeStr.value = new Date().toLocaleString();
  timer = setTimeout(updateTime, 1000);
};
updateTime();
const [register, { openDrawer }] = useDrawer();

onUnmounted(() => {
  clearTimeout(timer);
});
</script>

<style lang="scss" scoped>
.containers {
  display: flex;
  flex-flow: column;
  justify-content: space-between;
  height: 100%;
  width: 100%;
  padding: 30px 0;
  align-items: center;
}

.footer {
  text-align: center;
  font-size: 17px;
  color: #999;
}
</style>
